home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1987 February / 64er_Magazin_87-02_1987_Markt__Technik_de_Side_A.d64 / gdm v1.0 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  7KB  |  246 lines

  1. 1 a=a+1:if a=1 then load"gdm.obj",8,1
  2. 2 b=b+1:if b=1 then load"gdm.codes",8,1
  3. 3 :
  4. 14 rem ------------------------------
  5. 15 rem - gdm geos disketten monitor -
  6. 45 rem -    (c) markt & technik     -
  7. 50 rem ------------------------------
  8. 51 :
  9. 55 :
  10. 60 he$="-0123456789[193][194][195][196][197][198]"
  11. 65 h2$="-0123456789abcdef"
  12. 75 :
  13. 85 close 15:open 15,8,15,"i":close 2:open 2,8,2,"#"
  14. 90 poke 53280,0:poke 53281,0:poke 53272,23:poke 657,128:poke 646,1
  15. 91 poke 53248,32:poke 53249,219:poke 53288,1:poke 53269,1:poke 52264,0
  16. 92 poke 2040,13
  17. 95 :
  18. 100 rem    --- hauptmenue ---
  19. 105 print"[147][199][196][205][160][199]eos [196]iskmonitor [214]2                ";:poke 53269,1
  20. 106 print"   by [212]horsten [208]etrowski   (c) 64'er"
  21. 107 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]";
  22. 115 print"  f1[146] [204]esen  f2[146] [206]aechster  f3[146] schreiben"
  23. 120 print:print"  f4[146] [194]yte edit  f5[146] [196]irectory  f6[146] [210]eset"
  24. 125 print:print" f7[146] [197]nde f8[146] [194]lock edit _[146] [196]ump h[146] [200][197][216]-[197]dit";
  25. 126 print"[162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162]";
  26. 130 print"     [146][211]pur [    ]  [146] [211]ektor [    ]        [146]";
  27. 131 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]";
  28. 135 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][145][157]                        [146]";
  29. 140 print "[194]yte#   :[196][197][218] #    [200][197][216] $   [194][201][206] %        "
  30. 141 print"[176][192][192][192][174]                          76543210"
  31. 142 print"[221]   [221] [211]prite"
  32. 143 print"[221]   [221]"
  33. 144 print"[221]   [221]"
  34. 145 print"[173][192][192][192][189]";
  35. 146 gosub 575
  36. 150 :
  37. 155 :
  38. 160 rem   --- auswahl menue ---
  39. 165 md$="> [215][193][201][212][201][206][199][160]<":gosub 2000
  40. 166 get key$:if key$="" then 165
  41. 170 if key$="[133]" then gosub 590
  42. 175 if key$="[135]" then print"[147]":gosub 460:goto 105
  43. 176 if key$="h" then 1000
  44. 180 if key$="[140]" then gosub 575:goto 225
  45. 185 if key$="[139]" then 85
  46. 190 if key$="[134]" then gosub 650
  47. 195 if key$="[136]" then close 2:close 15:end
  48. 200 if key$="[137]" then t=peek(49664):s=peek(49665):key$="[133]":goto 170
  49. 205 if key$="[138]" then gosub 630
  50. 210 if key$="_" then gosub 340:goto 105
  51. 215 goto 165
  52. 220 :
  53. 225 rem     --- editieren ---
  54. 230 cr=1464+nr:ro=cr
  55. 235 x=29:y=0:gosub 675:print"> [197][196][201][212][201][206][199] <"
  56. 240 if nr>255 or nr<0 then nr=no:cr=ro
  57. 245 gosub 605
  58. 250 poke ro,peek(ro) and 127
  59. 255 poke cr,peek(cr) or 128
  60. 260 ro=cr:no=nr
  61. 265 get mo$:if mo$="" then 265
  62. 270 mo=asc(mo$):po=mo
  63. 275 if mo=29 then nr=nr+1:cr=cr+1:goto 240
  64. 280 if mo=17 then nr=nr+40:cr=cr+40:goto 240
  65. 285 if mo=138 then gosub 630:goto 240
  66. 290 if mo=145 then nr=nr-40:cr=cr-40:goto 240
  67. 295 if mo=157 then nr=nr-1:cr=cr-1:goto 240
  68. 300 if mo=13 then poke ro,peek(ro) and 127:goto 150
  69. 305 if mo>=65 and mo<=90 then po=po+32:goto 315
  70. 310 if mo>=193 and mo<=218 then po=po-128
  71. 315 y=int(nr/40):x=nr-y*40:y=y+11:gosub 675:print chr$(mo);
  72. 320 poke 49664+nr,po
  73. 325 if nr<255 then nr=nr+1:cr=cr+1
  74. 330 goto 240
  75. 335 :
  76. 340 rem      --- hardcopy ---
  77. 341 print"[147]":x=0:y=12:gosub 675:print"[196]rucker-[196]ump ...":poke 53269,0
  78. 342 print tab(10)"([196])ezimal"
  79. 343 print tab(10)"([200])exadezimal"
  80. 344 print tab(10)"([211])[212][207][208][160]!"
  81. 345 get mo$:if mo$="" then 345
  82. 346 if mo$="s" then return
  83. 347 if mo$="h" or mo$="d" then 353
  84. 348 goto 345
  85. 353 open 4,4,7:rem mps-801 ggf.aendern
  86. 354 poke768,61:print#4,:close4:poke 768,139
  87. 355 if st<>-128 then 359
  88. 356 x=5:y=20:gosub675:print"[196][210][213][195][203][197][210][160][206][201][195][200][212][160][193][206][199][197][211][195][200][193][204][212][197][212][160]!-[212]aste "
  89. 357 fort=0 to 255:poke 53280,t:next:get a$:if a$="" then 357
  90. 358 goto 353
  91. 359 open 4,4,7:gosub 675:print"                                      "
  92. 360 for out =0 to 31
  93. 361 :print#4,"[";
  94. 362 :if mo$="d" then print#4,right$(str$(out*8+1000),3);"] :";
  95. 363 :if mo$="h" then by=out*8:gosub 35000:print#4,hi$;"] ";
  96. 365 :for yb =0 to 7
  97. 369 ::if mo$="h" then by=peek(49664+out*8+yb):gosub 35000:print#4,hi$;
  98. 370 ::if mo$="d" then print#4,right$(str$(peek(49664+out*8+yb)+1000),3);
  99. 371 :print#4," ";
  100. 375 :next yb
  101. 380 :sys 49259,49664+out*8,8,pr$
  102. 385 :print#4,pr$
  103. 390 next out
  104. 395 print#4:print#4,"[199][196][205] [199]eos [196]isk [205]onitor von [212].[208]etrowski ([195]) 64'er":print#4
  105. 400 close 4:poke 53269,1:return
  106. 405 :
  107. 410 rem    --- disk-status ---
  108. 415 input#15,en,er$,et,es:poke 212,0
  109. 420 x=6:y=24:gosub 675:print"                                ";
  110. 425 x=6:y=24:gosub 675:poke 212,0
  111. 430 print"[196]isk :";er$;""
  112. 435 return
  113. 440 :
  114. 445 rem      --- strich ---
  115. 450 print"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]";:return
  116. 455 :
  117. 460 rem    --- directory ---
  118. 465 close 1:open 1,8,0,"$0":poke 53269,0
  119. 470 get#1,a$,a$:d=0:poke 198,0
  120. 475 d=d+1:if d=2 then print:gosub 445
  121. 480 print:print"     ";:if (st and 64)=64 then goto 500
  122. 485 if peek(198)=0 then 495
  123. 490 poke 198,0:wait 198,1:poke 198,0
  124. 495 sys 49215:goto 475
  125. 500 print"  --- [212]aste druecken ---":poke 198,0:wait 198,1
  126. 505 poke 53269,1:return
  127. 510 :
  128. 515 rem --- spur/sektor eingabe ---
  129. 520 x=11:y=9:gosub 675:in=t:gosub 700:t=in
  130. 535 x=27:y=9:gosub 675:in=s:gosub 700:s=in
  131. 545 return
  132. 550 :
  133. 555 rem     --- block lesen ---
  134. 560 poke 53269,0:print#15,"u1: 2 0 "t;s
  135. 565 sys 49152:nr=0:poke 53269,1:return
  136. 570 :
  137. 575 rem       --- anzeigen ---
  138. 580 x=0:y=11:gosub 675:sys 49177:poke 53280,0:return
  139. 585 :
  140. 590 rem        --- lesen ---
  141. 595 gosub 515:gosub 555:gosub 410:gosub 575:return
  142. 600 :
  143. 605 rem    --- wert ausgeben ---
  144. 610 x=5:y=19:gosub675:printright$(str$(nr+1000),3);
  145. 614 poke 211,14:printright$(str$(peek(49664+nr)+1000),3);
  146. 615 poke 211,23:printmid$(hex$,(((peek(49664+nr) and 240)+16)/16)+1,1);
  147. 616 printmid$(hex$,(peek(49664+nr)and 15)+2,1);
  148. 617 sys 49446,nr:poke 211,31:sys 49407,peek(49664+nr)
  149. 620 return
  150. 625 :
  151. 630 rem      --- byte edit ---
  152. 635 gosub 605:x=18:y=22:gosub 675:print"[206]euer [215]ert:";
  153. 636 open 3,0,0:input#3,by$:close 3
  154. 637 mo$=left$(by$,1)
  155. 638 if mo$<>"$" then 641
  156. 639 in$=mid$(by$,2):gosub41000
  157. 640 by=in:goto 649
  158. 641 if mo$<>"%" then 645
  159. 642 by=0:for bi=0 to 7
  160. 643 if mid$(by$,9-bi,1)="1" then by=by+2^bi
  161. 644 next bi:goto 649
  162. 645 iu=1:if mo$="#" then iu=2
  163. 646 by=val(mid$(by$,iu,3))
  164. 649 poke 49664+nr,by:gosub 575:return
  165. 650 rem      --- schreiben ---
  166. 655 gosub 515:print#15,"b-p 2 0":sys 49193
  167. 660 print#15,"u2: 2 0 ";t;s
  168. 665 gosub 410:return
  169. 670 :
  170. 675 rem    --- cursor setzen ---
  171. 680 poke 211,x:poke 214,y:sys 58732:return
  172. 690 :
  173. 700 rem --- eingabe (auch hex)
  174. 701 in$=right$(str$(in+1000),2):gosub 800
  175. 715 if left$(in$,1)="$" then in$=right$(in$,2):gosub 41000:return
  176. 716 in=val(in$)
  177. 720 return
  178. 800 print in$;
  179. 801 print" [146][157]";
  180. 805 get a$:if a$="" then 805
  181. 810 ll=len(in$):ifa$=chr$(20) andll>0 thenin$=left$(in$,ll-1):print"[157]  [157][157]";
  182. 811 if a$=chr$(20) then 801
  183. 812 if a$=chr$(13) then print" ";:return
  184. 815 if(a$>="0"anda$<="9")or(a$>="a"anda$<="f")or(a$>="[193]"anda$<="[198]")then 825
  185. 816 if a$="$" then 825
  186. 820 goto 805
  187. 825 if len(in$)<3 then in$=in$+a$:print a$;:goto 801
  188. 830 goto 805
  189. 1000 rem --- hex edit ---
  190. 1005 eb=0
  191. 1010 x=0:y=12:gosub 675
  192. 1011 print" [206]r   +0 +1 +2 +3 +4 +5 +6 +7 [193][211][195][201][201]     ";
  193. 1012 gosub 445:print"                                        ";:gosub 445
  194. 1013 print"   + [214]orw. - [218]ur. [210][197][212][213][210][206][160][197]ingeben q [197]nde"
  195. 1030 x=0:y=14:gosub 675:print"[";:by=eb:gosub 35000:print hi$;"]  ";
  196. 1035 fort=0 to 7:by=peek(49664+eb+t):gosub 35000:print hi$" ";:next t
  197. 1036 fort=0 to 7:printchr$(peek(peek(49664+eb+t)+49920));:next
  198. 1040 get k$:if k$="" then 1040
  199. 1045 if k$="q" then gosub 575:goto 160
  200. 1050 ob=eb:if k$="+" then eb=eb+8:if eb=256 then eb=0
  201. 1060 if k$="-" then eb=eb-8:if eb<0 then eb=248
  202. 1065 if k$=chr$(13) then 1080
  203. 1070 if ob<>eb then 1030
  204. 1071 goto 1040
  205. 1080 pb=1590:op=1589
  206. 1081 x=0:y=16:gosub 675:print"  0-f / 0-[198] [197]ingabe , [210][197][212][213][210][206] = [198]ertig   ";
  207. 1090 poke op,peek(op) and 127
  208. 1100 poke pb,peek(pb) or 128
  209. 1120 get k$:if k$="" then 1120
  210. 1125 op=pb
  211. 1130 if k$="" then pb=pb+1
  212. 1140 if k$="[157]" then pb=pb-1:goto 1179
  213. 1145 :
  214. 1150 if k$>="0" and k$<="9" then poke pb,asc(k$) or 128:pb=pb+1
  215. 1160 if k$>="a" and k$<="f" then poke pb,(asc(k$)-64) or 128:pb=pb+1
  216. 1170 if k$>="[193]" and k$<="[198]"then poke pb,(asc(k$)-128) or 128:pb=pb+1
  217. 1179 if ((pb-1589)/3)<>int((pb-1589)/3)    then 1185
  218. 1180 if k$="[157]" then pb=pb-1:goto 1185
  219. 1181 pb=pb+1
  220. 1185 if k$=chr$(13) then poke op,peek(op) and 127:goto 1220
  221. 1190 if pb>1612 then pb=1590
  222. 1200 if pb<1590 then pb=1612
  223. 1210 goto 1090
  224. 1220 ad=1589:for cn=0 to 7
  225. 1230 gosub 30000:poke (49664+eb+cn),by
  226. 1240 next cn:goto 1010
  227. 2000 rem --- modus anzeigen ---
  228. 2010 x=29:y=0:gosub 675:print "           ";:gosub 675:print md$:return
  229. 30000 rem --- umrechnen hex-dez bildnibbles
  230. 30010 by=0:gosub 30020:by=by+16*sb:gosub 30020:by=by+sb:ad=ad+1:return
  231. 30020 ad=ad+1:b0=peek(ad)and191:sb=0
  232. 30030 if b0>47 and b0<58 then sb=b0-48:return
  233. 30031 if b0>0 and b0<8 then sb=b0+9:return
  234. 30032 if b0>65 and b0<71 then sb=(b0-65)+9:return
  235. 30033 return
  236. 35000 rem --- umrechnen dez-hex
  237. 35010 hi$="":in=int((by and 240)/16):gosub 35030
  238. 35020 in=(by and 15):gosub 35030:return
  239. 35030 hi$=hi$+mid$(he$,in+2,1):return
  240. 41000 rem --- umrechnen hex-dez 1 nibble ---
  241. 41001 in=0:i$=mid$(in$,2,1):gosub41010:in=sb:i$=mid$(in$,1,1):gosub 41010
  242. 41002 in=in+16*sb:return
  243. 41010 sb=0:for c=2 to 17
  244. 41020 if i$=mid$(hex$,c,1) or i$=mid$(h2$,c,1) then sb=c-2:c=17
  245. 41030 next c:return
  246.